<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta charset="utf-8" />
		<base href="<%=basePath%>">
		<title>发布文章</title>
		<link rel="stylesheet"
			href="assets/plugins/kindeditor/themes/default/default.css" />
		<link rel="stylesheet"
			href="assets/plugins/kindeditor/plugins/code/prettify.css" />
		<script charset="utf-8" src="assets/plugins/kindeditor/kindeditor.js"></script>
		<script charset="utf-8" src="assets/plugins/kindeditor/lang/zh_CN.js"></script>
		<script charset="utf-8"
			src="assets/plugins/kindeditor/plugins/code/prettify.js"></script>

	</head>
	<body>
		添加文章成功 这里展示所有文章 也是文章的首页
		<br />
		<!--   
		<s:iterator value="list"> 
		<a href="#"><s:property value="title"/></a>
		<s:property value="content"/><br/><br/>
		</s:iterator>
		-->
		<s:iterator value="pageBean.list">

			<a href="articleAction!eachArticle?articleId=<s:property value="id"/>">
				<s:property value="title" /> 
			</a>
			<s:property value="content" />
			<br>
		</s:iterator>
		<br>
		共
		<s:property value="pageBean.allRow" />
		条记录 共
		<s:property value="pageBean.totalPage" />
		页 当前第
		<s:property value="pageBean.currentPage" />
		页
		<br />

		<s:if test="%{pageBean.currentPage == 1}">
            第一页 上一页
        </s:if>
		<s:else>
			<a href="articleAction!showAll?page=1">第一页</a>
			<a
				href="articleAction!showAll?page=<s:property value="%{pageBean.currentPage-1}"/>">上一页</a>
		</s:else>
		<s:if test="%{pageBean.currentPage != pageBean.totalPage}">
			<a
				href="articleAction!showAll?page=<s:property value="%{pageBean.currentPage+1}"/>">下一页</a>
			<a
				href="articleAction!showAll?page=<s:property value="pageBean.totalPage"/>">最后一页</a>
		</s:if>
		<s:else>
            下一页 最后一页
        </s:else>
	</body>
</html>